import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

void main() {
  runApp(MaterialApp(
    home: FileAssets(),
  ));
}
Future<String> loadAsset() async{
  // assets:
  //   - assets/json/config.json
  return await rootBundle.loadString('assets/json/config.json');
}

class FileAssets extends StatelessWidget {

  @override
  Widget build(BuildContext context) {
    loadAsset().then((value) => print(value));
    return const Text('load config file ');
  }
}